package com.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.SpuComment;
import com.example.vo.Result;
import com.example.vo.admin.AdminCommentVo;
import com.example.vo.comment.PageResult;
import com.example.vo.comment.SpuCommentDash;
import com.example.vo.comment.SpuCommentVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface SpuCommentService extends IService<SpuComment> {
    //获取商品评论列表
    List<SpuCommentVo> getSpuCommentList(Long spuId, Integer pageNo, Integer sortType,Integer type);

    Long getCommentCount(Long spuId);

    Result addComment(SpuComment spuComment);

    void likeOrCancelLike(Long commentId);

    List<Long> getLikeIds(Long spuId);

    void deleteComment(Integer id);

    SpuCommentDash getSpuCommentDash(Long spuId);

    String upload(MultipartFile file);

    PageResult<AdminCommentVo> getCommentPage(Integer pageNo, Integer pageNum, String keyword);
}
